<?php
/**
* 提现审核记录
*/
class Withdraw_audit_model extends CI_Model
{
	private $_table   = 'withdraw_audit';

	/**
	 * 插入提现记录
	 */
	public function insertWithdrawAudit($postData)
	{
		$data = array(
				'withdraw_id' => $postData['withdraw_id'],
				'audit_uid'   => $postData['uid'],
				'audit_name'  => $postData['name'],
				'state' 	  => (int)$postData['state'],
				'describe'    => $postData['describe']
			);
		return $this->db->insert($this->_table, $data);
	}

	/**
	 * 查找提现审核记录
	 */
	public function findByWithdrawId($withdrawId)
	{
		$this->db->select('audit_id, audit_uid, audit_name, state, describe, audit_time');
		$this->db->from($this->_table);
		$this->db->where('withdraw_id', (int)$withdrawId);
		return $this->db->get();
	}

}